# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# $Id: tagged.py 26 2008-08-15 15:38:31Z semente $
# ----------------------------------------------------------------------------
#
#  Copyright (c) 2008 Guilherme Mesquita Gondim
#
#  This file is part of django-fleshin.
#
#  django-fleshin is free software under terms of the GNU General
#  Public License version 3 (GPLv3) as published by the Free Software
#  Foundation. See the file README for copying conditions.
#

"""
URL definitions for Fleshin photos divided by tag.
"""

from django.conf.urls.defaults import *
from fleshin.models import Photo
from fleshin.settings import FLESHIN_NUM_LATEST

info_dict = {
    'paginate_by': FLESHIN_NUM_LATEST,
    'queryset_or_model': Photo.published_on_site.all(),
    'template_name': 'fleshin/fleshin_list_tagged.html',
    'template_object_name': 'photo',
}

tagged_photo_list = url(        # photos by tag
    regex  = '^(?P<tag>[^/]+)/$',
    view   = 'tagged_object_list',
    kwargs = info_dict,
    name   = 'fleshin-tagged-photo-list',
),

urlpatterns = patterns('tagging.views', tagged_photo_list)
